package com.platform.boot.security.group.authority;

import com.platform.boot.utils.BaseAutoToolsUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.data.relational.core.query.Query;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Flux;

/**
 * @author <a href="https://github.com/vnobo">Alex bob</a>
 */
@Service
@RequiredArgsConstructor
public class GroupAuthoritiesService extends BaseAutoToolsUtil {

    private final GroupAuthoritiesRepository groupAuthoritiesRepository;

    public Flux<GroupAuthority> search(GroupAuthorityRequest request) {
        return entityTemplate.select(Query.query(request.toCriteria()), GroupAuthority.class);
    }

}